package com.cbh.feign.controller.settlement;


import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.settlement.InvitationBonus;


public interface InvitationBonusControllerBase {

	/**
	 * 保存
	 * 
	 * @param accountToken
	 * @param ob
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/invitation/bonus/institution/user", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> save(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestBody(required = true) InvitationBonus ob);

	/**
	 * 根据ID获取邀请奖励设置
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/invitation/bonus/id", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<InvitationBonus> get(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id);

	/**
	 * 根据代理公司ID获取邀请奖励设置
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/invitation/bonus/institution", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<InvitationBonus>> getByInstitution(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id);

	/**
	 * 根据代理公司ID获取用户邀请奖励设置列表
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/invitation/bonus/institution/user", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<InvitationBonus>> getUserByInstitution(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id);

	/**
	 * 根据代理公司ID获取用户的邀请奖励设置
	 * 
	 * @param accountToken
	 * @param institutionId
	 * @param destinationId
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/invitation/bonus/institution/user/destination", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<InvitationBonus> getDestinationInInstitution(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "institutionId", required = true) String institutionId,
			@RequestParam(value = "destinationId", required = true) String destinationId);
}
